using UnityEngine;
using UnityEngine.UI;

public class WatchVideoADBtn : MonoBehaviour
{
	public enum VideoRewarfType
	{
		不显示, 筹码, 体力
	}

	public VideoRewarfType videoRewarfType = VideoRewarfType.不显示;
	public int videoRewarfNum = 1;

	private bool m_CanPlayVedio;

	private Animator m_WatchAdMaskAnim;

	public Button m_WatchBtn;

	public Text m_WatchAdText;

	private string _defaultText = string.Empty;

	private void Start()
	{
		if (videoRewarfType == VideoRewarfType.不显示)
		{
			base.gameObject.SetActive(false);
			return;
		}
		m_WatchAdMaskAnim = base.gameObject.GetComponent<Animator>();
		_defaultText = "免费\n";//HOLocalizationConfiguration.GetValue(174);

		_defaultText += videoRewarfType.ToString();
		//
		m_WatchBtn.interactable = true;
		m_WatchAdText.text = _defaultText;
	}

	public void CheckADVedioReady()
	{
		/* m_CanPlayVedio = AdManager.instance.curAd.HasVideo();
		base.gameObject.SetActive(m_CanPlayVedio); */
	}

	/* private void Update()
	{
		if (Time.frameCount % 60 == 0)
		{
			CheckADVedioReady();
		}
		if (base.gameObject.activeInHierarchy)
		{
			if (EternalNode.Instance.adPlayReady)
			{
				m_WatchBtn.interactable = true;
				m_WatchAdText.text = _defaultText;
			}
			else
			{
				m_WatchBtn.interactable = false;
				m_WatchAdText.text = EternalNode.Instance.watchingAdBtnRiseRecover;
			}
		}
	} */

	public void ClickBtn()
	{
		//UIADViewWnd.Show(UIADViewWnd.ADViewType.Video);
	}

	private void VideoBack()
	{
		switch (videoRewarfType)
		{
			case VideoRewarfType.体力:

				break;
			case VideoRewarfType.筹码:

				break;
		}
	}
}
